//
//  BluetoothPeripheralManager.h
//  BluetoothDemo
//
//  Created by Niko on 2025/8/26.
//

#import <Foundation/Foundation.h>
#import <CoreBluetooth/CoreBluetooth.h>

NS_ASSUME_NONNULL_BEGIN

// 定义服务UUID和特征UUID。这些必须是唯一的，并且通常使用标准UUID或自己生成的。
// 服务 UUID
static NSString * const kServiceUUID = @"FFF1";
// 特征UUID
static NSString * const kCharacteristicUUID = @"00001101-0000-1000-8000-00805f9b34fb";

@interface BluetoothPeripheralManager : NSObject <CBPeripheralManagerDelegate>

+ (instancetype)sharedInstance;
- (void)startAdvertising;
- (void)stopAdvertising;

@property (nonatomic, strong) CBPeripheralManager *peripheralManager;
@property (nonatomic, strong) CBMutableService *customService;
@property (nonatomic, strong) CBMutableCharacteristic *customCharacteristic;
@property (nonatomic, assign) BOOL isAdvertising;

@property (nonatomic, assign) NSString *bluetoothName;

@end

NS_ASSUME_NONNULL_END

